package ru.averta.notes.domain.forms;

import ru.averta.notes.domain.Site;

/**
 *
 * @author fedor.belov
 */
public class SiteAddForm implements IFormToDomainObject<Site> {

    private String title;
    private Long folderId;
    private String url;

    public Long getFolderId() {
        return folderId;
    }

    public void setFolderId(Long folderId) {
        this.folderId = folderId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Override
    public void loadFromDomainObject(Site object) {
        title = object.getTitle();
        url = object.getUrl().getUrl();
    }

    @Override
    public Site loadToDomainObject(Site object) {
       /*object.setTitle(title);  //todo
        object.setUrl(url);
        return object;*/
        return null;
    }


}
